x86/p2m: don't ignore p2m_remove_page()'s return value
authorJan Beulich <jbeulich@suse.com>
Fri, 3 Apr 2020 08:56:10 +0000 (10:56 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 3 Apr 2020 08:56:10 +0000 (10:56 +0200)
commita6b051a87a586347969bfbaa6925ac0f0c845413
tree4ebefbf456d478e5f6728f3213ccb3022fad3294
parent5b6a3c67cd7c3834235eb17a82c98ad0ee384017
x86/p2m: don't ignore p2m_remove_page()'s return value

It's not very nice to return from guest_physmap_add_entry() after
perhaps already having made some changes to the P2M, but this is pre-
existing practice in the function, and imo better than ignoring errors.

Take the liberty and replace an mfn_add() instance with a local variable
already holding the result (as proven by the check immediately ahead).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/mm/p2m.c